<?php
if (isset($_GET['url'])) {
    $url = $_GET['url'];
    $content = file_get_contents($url);
    $filename ='./images/'.md5($url).'.jpg';
    file_put_contents($filename, $content);
    echo "$url<br>";
    $img = "<img width='300' src=\"".$filename."\"/>";
    echo $img;
}else{
    echo "lost param url";
}
?>